<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<style>


    .task {
        text-align: center;
        vertical-align: middle;
    }

    div.div-border {
        box-sizing: border-box;
        -moz-box-sizing: border-box;
        /* Firefox */
        -webkit-box-sizing: border-box;
        /* Safari */
        border: 1px solid #000000;
        border-bottom: none;
    }

    #plan div ul {
        padding-left: 10px;
    }

    #plan div ul li {
        list-style: none;
        line-height: 28px;
    }

    #plan a {
        font-size: 14px;
        color: #000000;
        cursor: pointer;
    }

    #plan a:hover {
        font-size: 16px;
        color: #000000;
        cursor: pointer;
    }

    #task a {
        font-size: 14px;
        color: #000000;
        width: 100%;
        height: 100%;
        display: block;
        cursor: pointer;
    }

    #outPartPur {
        font-size: 14px;
        color: #000000;
        width: 100%;
        height: 100%;
        display: block;
        cursor: pointer;
    }

    #purPartPur {
        font-size: 14px;
        color: #000000;
        width: 100%;
        height: 100%;
        display: block;
        cursor: pointer;
    }

    #task a:hover {
        font-size: 16px;
        color: #000000;
        width: 100%;
        height: 100%;
        display: block;
        cursor: pointer;
    }

    #ret a {
        font-size: 14px;
        color: #000000;
        cursor: pointer;
    }

    #ret a:hover {
        font-size: 16px;
        color: #000000;
        cursor: pointer;
    }

    #second_div {
        width: 80%;
        margin: 50px auto 0;
        background: #f9f9f9;
        border: 1px solid #b4daf9;
        padding: 20px 40px 40px;
        text-align: center;
        border-radius: 2px;
    }

    .lcs_wrap {
        display: inline-block;
        direction: ltr;
        height: 28px;
        vertical-align: middle;
    }

    .lcs_wrap input {
        display: none;
    }

    .lcs_switch {
        display: inline-block;
        position: relative;
        width: 73px;
        height: 28px;
        border-radius: 30px;
        background: #ddd;
        overflow: hidden;
        cursor: pointer;
        -webkit-transition: all .2s ease-in-out;
        -ms-transition: all .2s ease-in-out;
        transition: all .2s ease-in-out;
    }

    .lcs_cursor {
        display: inline-block;
        position: absolute;
        top: 3px;
        width: 22px;
        height: 22px;
        border-radius: 100%;
        background: #fff;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.1);
        z-index: 10;
        -webkit-transition: all .2s linear;
        -ms-transition: all .2s linear;
        transition: all .2s linear;
    }

    .lcs_label {
        font-family: "Trebuchet MS", Helvetica, sans-serif;
        font-size: 12px;
        letter-spacing: 1px;
        line-height: 18px;
        color: #fff;
        font-weight: bold;
        position: absolute;
        width: 33px;
        top: 5px;
        overflow: hidden;
        text-align: center;
        opacity: 0;
        -webkit-transition: all .2s ease-in-out .1s;
        -ms-transition: all .2s ease-in-out .1s;
        transition: all .2s ease-in-out .1s;
    }

    .lcs_label.lcs_label_on {
        left: -70px;
        z-index: 6;
    }

    .lcs_label.lcs_label_off {
        right: -70px;
        z-index: 5;
    }

    /* on */
    .lcs_switch.lcs_on {
        background: #75b936;
        box-shadow: 0 0 2px #579022 inset;
    }

    .lcs_switch.lcs_on .lcs_cursor {
        left: 48px;
    }

    .lcs_switch.lcs_on .lcs_label_on {
        left: 10px;
        opacity: 1;
    }

    /* off */
    .lcs_switch.lcs_off {
        background: #b2b2b2;
        box-shadow: 0px 0px 2px #a4a4a4 inset;
    }

    .lcs_switch.lcs_off .lcs_cursor {
        left: 3px;
    }

    .lcs_switch.lcs_off .lcs_label_off {
        right: 10px;
        opacity: 1;
    }

    /* disabled */
    .lcs_switch.lcs_disabled {
        opacity: 0.65;
        filter: alpha(opacity=65);
        cursor: default;
    }

    /*以下是单选按钮*/
    [class*="icheck-"] {
        min-height: 22px;
        margin-top: 6px !important;
        margin-bottom: 6px !important;
        padding-left: 0px;
    }

    .icheck-inline {
        display: inline-block;
    }

    .icheck-inline + .icheck-inline {
        margin-left: .75rem;
        margin-top: 6px;
    }

    [class*="icheck-"] > label {
        padding-left: 29px !important;
        min-height: 22px;
        line-height: 22px;
        display: inline-block;
        position: relative;
        vertical-align: top;
        margin-bottom: 0;
        font-weight: normal;
        cursor: pointer;
    }

    [class*="icheck-"] > input:first-child {
        position: absolute !important;
        opacity: 0;
        margin: 0;
    }

    [class*="icheck-"] > input:first-child:disabled {
        cursor: default;
    }

    [class*="icheck-"] > input:first-child + label::before,
    [class*="icheck-"] > input:first-child + input[type="hidden"] + label::before {
        content: "";
        display: inline-block;
        position: absolute;
        width: 22px;
        height: 22px;
        border: 1px solid #D3CFC8;
        border-radius: 0px;
        margin-left: -29px;
    }

    [class*="icheck-"] > input:first-child:checked + label::after,
    [class*="icheck-"] > input:first-child:checked + input[type="hidden"] + label::after {
        content: "";
        display: inline-block;
        position: absolute;
        top: 0;
        left: 0;
        width: 7px;
        height: 10px;
        border: solid 2px #fff;
        border-left: none;
        border-top: none;
        transform: translate(7.75px, 4.5px) rotate(45deg);
        -ms-transform: translate(7.75px, 4.5px) rotate(45deg);
    }

    [class*="icheck-"] > input[type="radio"]:first-child + label::before,
    [class*="icheck-"] > input[type="radio"]:first-child + input[type="hidden"] + label::before {
        border-radius: 50%;
    }

    [class*="icheck-"] > input:first-child:not(:checked):not(:disabled):hover + label::before,
    [class*="icheck-"] > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-width: 2px;
    }

    [class*="icheck-"] > input:first-child:disabled + label,
    [class*="icheck-"] > input:first-child:disabled + input[type="hidden"] + label,
    [class*="icheck-"] > input:first-child:disabled + label::before,
    [class*="icheck-"] > input:first-child:disabled + input[type="hidden"] + label::before {
        pointer-events: none;
        cursor: default;
        filter: alpha(opacity=65);
        -webkit-box-shadow: none;
        box-shadow: none;
        opacity: .65;
    }

    .icheck-default > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-default > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #adadad;
    }

    .icheck-default > input:first-child:checked + label::before,
    .icheck-default > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #e6e6e6;
        border-color: #adadad;
    }

    .icheck-default > input:first-child:checked + label::after,
    .icheck-default > input:first-child:checked + input[type="hidden"] + label::after {
        border-bottom-color: #333;
        border-right-color: #333;
    }

    .icheck-primary > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-primary > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #2e6da4;
    }

    .icheck-primary > input:first-child:checked + label::before,
    .icheck-primary > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #337ab7;
        border-color: #2e6da4;
    }

    .icheck-success > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-success > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #4cae4c;
    }

    .icheck-success > input:first-child:checked + label::before,
    .icheck-success > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #5cb85c;
        border-color: #4cae4c;
    }

    .icheck-info > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-info > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #46b8da;
    }

    .icheck-info > input:first-child:checked + label::before,
    .icheck-info > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #5bc0de;
        border-color: #46b8da;
    }

    .icheck-warning > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-warning > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #eea236;
    }

    .icheck-warning > input:first-child:checked + label::before,
    .icheck-warning > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #f0ad4e;
        border-color: #eea236;
    }

    .icheck-danger > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-danger > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #d43f3a;
    }

    .icheck-danger > input:first-child:checked + label::before,
    .icheck-danger > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #d9534f;
        border-color: #d43f3a;
    }

    .icheck-turquoise > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-turquoise > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #1abc9c;
    }

    .icheck-turquoise > input:first-child:checked + label::before,
    .icheck-turquoise > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #1abc9c;
        border-color: #1abc9c;
    }

    .icheck-emerland > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-emerland > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #2ecc71;
    }

    .icheck-emerland > input:first-child:checked + label::before,
    .icheck-emerland > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #2ecc71;
        border-color: #2ecc71;
    }

    .icheck-peterriver > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-peterriver > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #3498db;
    }

    .icheck-peterriver > input:first-child:checked + label::before,
    .icheck-peterriver > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #3498db;
        border-color: #3498db;
    }

    .icheck-amethyst > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-amethyst > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #9b59b6;
    }

    .icheck-amethyst > input:first-child:checked + label::before,
    .icheck-amethyst > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #9b59b6;
        border-color: #9b59b6;
    }

    .icheck-wetasphalt > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-wetasphalt > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #34495e;
    }

    .icheck-wetasphalt > input:first-child:checked + label::before,
    .icheck-wetasphalt > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #34495e;
        border-color: #34495e;
    }

    .icheck-greensea > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-greensea > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #16a085;
    }

    .icheck-greensea > input:first-child:checked + label::before,
    .icheck-greensea > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #16a085;
        border-color: #16a085;
    }

    .icheck-nephritis > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-nephritis > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #27ae60;
    }

    .icheck-nephritis > input:first-child:checked + label::before,
    .icheck-nephritis > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #27ae60;
        border-color: #27ae60;
    }

    .icheck-belizehole > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-belizehole > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #2980b9;
    }

    .icheck-belizehole > input:first-child:checked + label::before,
    .icheck-belizehole > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #2980b9;
        border-color: #2980b9;
    }

    .icheck-wisteria > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-wisteria > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #8e44ad;
    }

    .icheck-wisteria > input:first-child:checked + label::before,
    .icheck-wisteria > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #8e44ad;
        border-color: #8e44ad;
    }

    .icheck-midnightblue > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-midnightblue > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #2c3e50;
    }

    .icheck-midnightblue > input:first-child:checked + label::before,
    .icheck-midnightblue > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #2c3e50;
        border-color: #2c3e50;
    }

    .icheck-sunflower > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-sunflower > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #f1c40f;
    }

    .icheck-sunflower > input:first-child:checked + label::before,
    .icheck-sunflower > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #f1c40f;
        border-color: #f1c40f;
    }

    .icheck-carrot > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-carrot > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #e67e22;
    }

    .icheck-carrot > input:first-child:checked + label::before,
    .icheck-carrot > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #e67e22;
        border-color: #e67e22;
    }

    .icheck-alizarin > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-alizarin > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #e74c3c;
    }

    .icheck-alizarin > input:first-child:checked + label::before,
    .icheck-alizarin > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #e74c3c;
        border-color: #e74c3c;
    }

    .icheck-clouds > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-clouds > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #ecf0f1;
    }

    .icheck-clouds > input:first-child:checked + label::before,
    .icheck-clouds > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #ecf0f1;
        border-color: #ecf0f1;
    }

    .icheck-clouds > input:first-child:checked + label::after,
    .icheck-clouds > input:first-child:checked + input[type="hidden"] + label::after {
        border-bottom-color: #95a5a6;
        border-right-color: #95a5a6;
    }

    .icheck-concrete > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-concrete > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #95a5a6;
    }

    .icheck-concrete > input:first-child:checked + label::before,
    .icheck-concrete > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #95a5a6;
        border-color: #95a5a6;
    }

    .icheck-orange > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-orange > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #f39c12;
    }

    .icheck-orange > input:first-child:checked + label::before,
    .icheck-orange > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #f39c12;
        border-color: #f39c12;
    }

    .icheck-pumpkin > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-pumpkin > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #d35400;
    }

    .icheck-pumpkin > input:first-child:checked + label::before,
    .icheck-pumpkin > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #d35400;
        border-color: #d35400;
    }

    .icheck-pomegranate > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-pomegranate > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #c0392b;
    }

    .icheck-pomegranate > input:first-child:checked + label::before,
    .icheck-pomegranate > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #c0392b;
        border-color: #c0392b;
    }

    .icheck-silver > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-silver > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #bdc3c7;
    }

    .icheck-silver > input:first-child:checked + label::before,
    .icheck-silver > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #bdc3c7;
        border-color: #bdc3c7;
    }

    .icheck-asbestos > input:first-child:not(:checked):not(:disabled):hover + label::before,
    .icheck-asbestos > input:first-child:not(:checked):not(:disabled):hover + input[type="hidden"] + label::before {
        border-color: #7f8c8d;
    }

    .icheck-asbestos > input:first-child:checked + label::before,
    .icheck-asbestos > input:first-child:checked + input[type="hidden"] + label::before {
        background-color: #7f8c8d;
        border-color: #7f8c8d;
    }

    /*漂亮的表格样式*/

    .mainbox {
        width: 1200px;
        margin: 0px auto 0 auto;
    }

    .mainbox h2 {
        margin: 0px auto;
        font-size: 36px;
        line-height: 2em;
        text-align: center;
        position: relative;
    }

    .responsive {
        margin: 25px 0 0 0;
    }

    .mainbox table {
        border-collapse: collapse;
        border-top: 0 !important;
        width: 100%;
    }

    .mainbox table th {
        color: #fff;
        height: 35px;
        min-width: 80px;
        max-width: 60px;
        white-space: nowrap;
        border: none;
        border-radius: 10px 10px 0px 0px;
    }

    .mainbox table th, .mainbox table td {
        text-align: center;
        font-size: 16px;
        line-height: 30px;
        background: #fff;
    }

    .mainbox .red {
        color: #e40202;
    }

    .mainbox tr:nth-child(2n+1) td {
        background: #f1f1f1;
    }

    .mainbox table td {
        border: 1px #e9edf1 solid;
        border-right: 1px #d1d1d1 solid;
    }

    .gou {
        display: inline-block;
        width: 22px;
        height: 22px;
        background: url(../images/gou.gif);
    }
    .bg-light-green{
        background: #00e765;
    }
</style>
<body class="hold-transition skin-yellow sidebar-mini">
<!--项目任务需要不需要-->
<div class="modal fade" id="modal-Task">
    <div class="modal-dialog" style="width:850px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">任务列表</h4>
            </div>
            <div class="modal-body">
                <table class="table table-bordered">
                    <tbody id="taskForm">
                    <tr>
                        <th class="text-center" style="width: 50px;">序号</th>
                        <th class="text-center">任务名</th>
                        <th class="text-center" style="width: 120px;">是否需要</th>
                    </tr>
                    <tr>
                        <td class="text-center" style="width: 50px;">1</td>
                        <td class="text-center">工艺</td>
                        <td class="text-center" style="width: 120px;">
                            <div class="lcs_wrap">
                                <input type="checkbox" id="check-3" name="check-3" value="1" class="lcs_check"
                                       autocomplete="on">
                                <div class="lcs_switch  lcs_checkbox_switch lcs_on" name="check-3"
                                     onclick="changeNeed(this);">
                                    <div class="lcs_cursor"></div>
                                    <div class="lcs_label lcs_label_on">需要</div>
                                    <div class="lcs_label lcs_label_off">不要</div>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="text-center" style="width: 50px;">2</td>
                        <td class="text-center">调试</td>
                        <td class="text-center" style="width: 120px;">
                            <div class="lcs_wrap">
                                <input type="checkbox" id="check-7" name="check-7" value="7" class="lcs_check"
                                       autocomplete="on">
                                <div class="lcs_switch  lcs_checkbox_switch lcs_on" name="check-7"
                                     onclick="changeNeed(this);">
                                    <div class="lcs_cursor"></div>
                                    <div class="lcs_label lcs_label_on">需要</div>
                                    <div class="lcs_label lcs_label_off">不要</div>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="text-center" style="width: 50px;">3</td>
                        <td class="text-center">安装发货</td>
                        <td class="text-center" style="width: 120px;">
                            <div class="lcs_wrap">
                                <input type="checkbox" id="check-8" name="check-8" value="8" class="lcs_check" autocomplete="on">
                                <div class="lcs_switch  lcs_checkbox_switch lcs_on" name="check-8" onclick="changeNeed(this);">
                                    <div class="lcs_cursor"></div>
                                    <div class="lcs_label lcs_label_on">需要</div>
                                    <div class="lcs_label lcs_label_off">不要</div>
                                </div>
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-info" data-dismiss="modal" onclick="saveTaskStatus()">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
<section class="content-header" style="text-align: center">
    <div><h1 style="color:#000000;display: inline-block">生产进度单项目看板</h1></div>
    <div style="font-size: 16px;">
        <div class="pull-left" style="color:#000000;display: inline-block;line-height: 50px">
            <label style="margin-left: 15px;">生产令编号</label>
            <label style="padding: 0" th:text="${prodOrd.prodNo}"></label>
            <label style="margin-left: 15px;">项目名称</label>
            <label style="padding: 0"><p style="word-wrap:break-word" th:text="${project.proName}"></p></label>
            <label style="margin-left: 15px;">项目数量</label>
            <label style="padding: 0" th:text="${project.proQty}"></label>
            <label style="margin-left: 15px;">需方</label>
            <label style="padding: 0" th:text="${project.customer}"></label>
            <label style="margin-left: 15px;">安装地点</label>
            <label style="padding: 0" th:text="${project.insSite}"></label>
            <label style="margin-left: 15px;">交货时间</label>
            <label style="padding: 0" th:text="${#dates.format(cusDeliveryDate,'yyyy.MM.dd')}"></label>
        </div>
        <div class="pull-right" style="color:#000000;display: inline-block;line-height: 50px;">
            <a shiro:hasPermission="pro:facPlan:edit" th:href="@{'/task/gotoFactoryPlanListPage/'+${prodNo}}"
               target="_blank"
               class="btn btn-info pull-right" style="margin-right: 15px;display: inline-block;">厂级计划编辑与反馈</a>
            <button shiro:hasPermission="pro:retTask:edit" type="button" th:onclick="jumpPage([[${prodNo}]])"
                    class="btn btn-warning pull-right"
                    style="margin-right: 15px;display: inline-block;">任务状态与反馈编辑
            </button>
            <button id="btn_taskIsNeed" th:data-proCode="${proCode}" shiro:hasPermission="pro:taskIsNeed:edit"
                    class="btn btn-warning pull-right" style="margin-right: 15px;display: inline-block;">任务是否需要
            </button>
        </div>
    </div>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box" style="background-color: transparent!important;">
                <div class="box-body"
                     style="display: flex;justify-content: center;background-color: transparent!important;color:#ffffff;">
                    <div id="plan" style="float:left;text-align: center;background:#FBFBEA"></div>
                    <div id="taskType" style="float:left;background:transparent">
                        <div class="task bg-blue"
                             style="width:20px;height:51px;display: flex;align-items: center;
                             border-top:  1px #000000 solid;
                              border-right:  1px #000000 solid;
                                border-bottom:  1px #000000 solid;
                             ">
                            类别
                        </div>
                        <div class="task bg-blue"
                             style="width:20px;height:101px;display: flex;align-items: center;
                                   border-right:  1px #000000 solid;
                                border-bottom:  1px #000000 solid;">
                            设计
                        </div>
                        <div class="task bg-blue"
                             style="width:20px;height:101px;display: flex;align-items: center;
                                   border-right:  1px #000000 solid;
                                border-bottom:  1px #000000 solid;">
                            工艺
                        </div>
                        <div class="task bg-blue"
                             style="width:20px;height:101px;display: flex;align-items: center;
                                   border-right:  1px #000000 solid;
                                border-bottom:  1px #000000 solid;">
                            采购
                        </div>
                        <div class="task bg-blue"
                             style="width:20px;height:305px;display: flex;align-items: center;
                                       border-right:  1px #000000 solid;
                                border-bottom:  1px #000000 solid;">
                            生产
                        </div>
                        <div class="task bg-blue"
                             style="width:20px;height:101px;display: flex;align-items: center;
                                   border-right:  1px #000000 solid;
                                border-bottom:  1px #000000 solid;">
                            仓储
                        </div>
                        <div class="task bg-blue"
                             style="width:20px;height:203px;display: flex;align-items: center;
                                       border-right:  1px #000000 solid;
                                border-bottom:  1px #000000 solid;">
                            装配
                        </div>
                        <div class="task bg-blue"
                             style="width:20px;height:101px;display: flex;align-items: center;
       border-right:  1px #000000 solid;
                                border-bottom:  1px #000000 solid;">
                            仓储
                        </div>
                        <div class="task bg-blue"
                             style="width:20px;height:50px;display: flex;align-items: center;
  border-right:  1px #000000 solid;
                                border-bottom:  1px #000000 solid;">
                            发货
                        </div>
                        <div class="task bg-blue"
                             style="width:20px;height:203px;display: flex;align-items: center;
       border-right:  1px #000000 solid;
                                border-bottom:  1px #000000 solid;">
                            安装
                        </div>
                    </div>
                    <div id="task" style="float:left;width:500px;background:#FBFBEA">
                        <div class="task"
                             style="background: #e8ffe8;float:left;line-height:50px;color:#000000;font-width: 900;font-size: 28px;
                              border-top:  1px #000000 solid;
                              border-right:  1px #000000 solid;
                                border-bottom:  1px #000000 solid;width:500px">
                            工作任务
                        </div>
                        <div class="task"
                             style="background: transparent;float:left;line-height:102px;
 border-right:  1px #000000 solid;
                                border-bottom:  1px #000000 solid;">
                            <div id="partslistAndDrawings" class="task"
                                 style="float:left;width: 398px;height:99px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-right: 1px solid #000000;">
                                <a th:href="@{'/task/productionListview/'+${prodNo}}" target="_blank">制作件清单及图纸</a>
                            </div>
                            <div id="purPlan" class="task" style="float:left;width: 101px;height:99px;">
                                <a th:href="@{'/task/purPlanListView/'+${prodNo}}" target="_blank">外购件计划</a>
                            </div>
                        </div>
                        <div class="task"
                             style="background: transparent;float:left;
 border-right:  1px #000000 solid;
                                border-bottom:  1px #000000 solid;">
                            <div class="task" style="float:left;">
                                <div id="technology" class="task"
                                     style="width: 298px;line-height:49.5px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-right: 1px solid #000000;">
                                    <a th:href="@{'/task/processCardListView/'+${prodNo}}" target="_blank">工艺卡编制</a>
                                </div>
                                <div id="rawMaterialPlan" class="task"
                                     style="width: 298px;line-height:50px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-top: 1px solid #000000;border-right: 1px solid #000000;border-bottom:#000000 1px solid;">
                                    <a th:href="@{'/task/rawMatPlanListView/'+${prodNo}}" target="_blank">原材料计划</a>
                                </div>
                            </div>
                            <div style="float:left;width:200px;">
                                <div id="outsourcingPartsPlan" class="task"
                                     style="float:left;width: 100.5px;line-height: 100.5px;border-bottom:#000000 1px solid;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-right: 1px solid #000000;">
                                    <a th:href="@{'/task/outPlanListView/'+${prodNo}}" target="_blank"> 外协件计划</a>
                                </div>
                                <div id="purPartProcurement1" class="task"
                                     style="background:#5EEFFD; float:left;width:99.5px;line-height: 101px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;display: flex;align-items: center;justify-content: center;">
                                    <a onmouseover="atagHouve('purPartPur')" onmouseleave="atagLeave('purPartPur')">&nbsp;</a>
                                </div>
                            </div>

                            <div id="rawMaterialUseStock" class="task"
                                 style="background:#5EEFFD;  clear:both;float:left;width: 149px;line-height:100.8px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-right: 1px solid #000000;display: flex;align-items: center;justify-content: center;">
                                <a th:href="@{'/task/rawMatUseStockListView/'+${prodNo}}" target="_blank">原材料使用库存</a>
                            </div>
                            <div id="rawMaterialProcurement" class="task"
                                 style="background:#5EEFFD; float:left;width: 149px;line-height:100.8px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-right: 1px solid #000000;display: flex;align-items: center;justify-content: center;">
                                <a th:href="@{'/task/rawMatBuyListView/'+${prodNo}}" target="_blank">原材料采购</a>
                            </div>
                            <div id="outsourcingPartsProcurement1" class="task"
                                 style="background:#5EEFFD; float:left;width: 100.5px;line-height: 100.8px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-right: 1px solid #000000;display: flex;align-items: center;justify-content: center;">
                                <a th:href="@{'/task/outBuyListView/'+${prodNo}}" target="_blank"
                                   onmouseover="atagHouve('outPartPur')"
                                   onmouseleave="atagLeave('outPartPur')">&nbsp;</a>
                            </div>
                            <div id="purPartProcurement2" class="task"
                                 style="background:#5EEFFD; float:left;width: 99.5px;line-height: 100.8px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;display: flex;align-items: center;justify-content: center;">
                                <a onmouseover="atagHouve('purPartPur')"
                                   onmouseleave="atagLeave('purPartPur')">&nbsp;</a>
                            </div>
                            <div id="productionTask" class="task"
                                 style="float:left;width: 298px;height:305px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-right: 1px solid #000000;border-top: 1px solid #000000;display: flex;align-items: center;justify-content: center;">
                                <!--                                <div id="cut"-->
                                <!--                                     style="width: 100%;line-height:49.5px;border-top: 1px solid #000000;border-right: 1px solid #000000;border-bottom:#000000 1px solid;">-->
                                <!--                                    <a th:href="@{'/task/cutTaskView/'+${prodNo}}" target="_blank">下料</a>-->
                                <!--                                </div>-->
                                <ul style="list-style: none;line-height: 60px;width: 100%;padding: 0;margin: 0px;height: 305px">
                                    <li class="task" id="cut"><a style="border-bottom: #000000 1px solid;width: 100%"
                                                                 th:href="@{'/task/cutTaskView/'+${prodNo}}"
                                                                 target="_blank">下料</a></li>
                                    <li class="task" id="rivetAndSolder"><a
                                            th:href="@{'/task/productionSchedule/'+${prodNo}}" target="_blank">铆焊</a>
                                    </li>
                                    <li class="task" id="machiningPartsByrivetAndSolder"><a
                                            th:href="@{'/task/productionSchedule/'+${prodNo}}"
                                            target="_blank">机加件（铆焊）</a></li>
                                    <li class="task" id="reflowWeldment"><a
                                            th:href="@{'/task/productionSchedule/'+${prodNo}}" target="_blank">返焊件</a>
                                    </li>
                                    <li class="task" id="machining" style="height: 63px"><a
                                            th:href="@{'/task/productionSchedule/'+${prodNo}}" target="_blank">机加</a>
                                    </li>
                                </ul>
                            </div>
                            <div id="outsourcingPartsProcurement2" class="task"
                                 style="background:#5EEFFD; float:left;width: 100.5px;height: 305px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-right: 1px solid #000000;display: flex;justify-content: center;padding-top: 60px;">
                                <a th:href="@{'/task/outBuyListView/'+${prodNo}}" target="_blank" id="outPartPur"
                                   onmouseover="atagHouve('outPartPur')"
                                   onmouseleave="atagLeave('outPartPur')">外协件<br>采购</a>
                            </div>
                            <div id="purPartProcurement3" class="task"
                                 style="background:#5EEFFD; float:left;width: 99.5px;height: 305px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;display: flex;align-items:flex-start;justify-content: center;">
                                <a th:href="@{'/task/purBuyListView/'+${prodNo}}" target="_blank" id="purPartPur"
                                   onmouseover="atagHouve('purPartPur')"
                                   onmouseleave="atagLeave('purPartPur')">外购件<br>采购</a>
                            </div>

                            <div class="task"
                                 style="background:#5EEFFD;float:left;width: 100%;line-height:100px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-top: 1px solid #000000;display: flex;align-items: center;justify-content: center;">
                                <a th:href="@{'/task/halfStoreList/'+${prodNo}}" target="_blank">半成品库（虚拟）</a>
                            </div>
                            <!--                            <div style="float:left;width: 100.5px;line-height: 100px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-right: 1px solid #000000;border-top: 1px solid #000000;display: flex;align-items: center;justify-content: center;">-->
                            <!--                                <a>外协回货数据</a>-->
                            <!--                            </div>-->
                            <!--                            <div style="float:left;width: 99.5px;line-height: 100px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;display: flex;align-items: center;justify-content: center;border-top: 1px solid #000000;">-->
                            <!--                                <a>外购回货数据</a>-->
                            <!--                            </div>-->
                            <div id="assemblyDispatchList" class="task"
                                 style="background:#5EEFFD;float:left;width: 100%;line-height:101px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-top: 1px solid #000000;display: flex;align-items: center;justify-content: center;">
                                <a th:href="@{'/task/assemblySheetListView/'+${prodNo}}" target="_blank">装配派工单</a>
                            </div>
                            <div id="assembling" class="task"
                                 style="float:left;width: 100%;line-height:100.5px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-top: 1px solid #000000;display: flex;align-items: center;justify-content: center;">
                                <a th:href="@{'/task/assemblyListView/'+${prodNo}}" target="_blank">装配</a>
                            </div>
                            <div id="virtualProductWarehouse" class="task"
                                 style="background:#5EEFFD;float:left;width: 100%;line-height:100.5px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-top: 1px solid #000000;display: flex;align-items: center;justify-content: center;">
                                <a th:href="@{'/task/storeList/'+${prodNo}}" target="_blank">成品库（虚拟）</a>
                            </div>
                            <!--                            <div id="productWarehouse" class="task"-->
                            <!--                                 style="float:left;width: 249px;line-height:100.5px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-top: 1px solid #000000;display: flex;align-items: center;justify-content: center;">-->
                            <!--                                <a>成品库（实体）</a>-->
                            <!--                            </div>-->
                            <div id="deliveryList" class="task"
                                 style="background:#5EEFFD;float:left;width: 100%;line-height:49.5px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-top: 1px solid #000000;display: flex;align-items: center;justify-content: center;">
                                <a th:href="@{'/task/shipmentPlanView/'+${prodNo}}" target="_blank">发货计划</a>
                            </div>
                            <div id="installationDispatchList" class="task"
                                 style="background:#5EEFFD;float:left;width: 100%;line-height:101px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-top: 1px solid #000000;display: flex;align-items: center;justify-content: center;">
                                <a th:href="@{'/task/dispatchingView/'+${prodNo}}" target="_blank">安装派工单</a>
                            </div>
                            <div id="install" class="task"
                                 style="float:left;width: 100%;line-height:100.5px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;border-top: 1px solid #000000;display: flex;align-items: center;justify-content: center;">
                                <a th:href="@{'/task/installListView/'+${prodNo}}" target="_blank">安装</a>
                            </div>
                        </div>
                    </div>
                    <div id="ret"
                         style="float:left;text-align: center;background:#FBFBEA;border-bottom:  1px #000000 solid;">
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<div style="display: none">
    <input id="prodNo" th:value="${prodNo}" style="display: none"/>
    <input id="proCode" th:value="${proCode}" style="display: none"/>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    $(function () {
        /** 打开任务是否需要模态框 */
        $("#btn_taskIsNeed").on('click', function () {
            selTask();
            js.modal.open('modal-Task');
        });
        /**加载计划和反馈信息*/
        js.post({
            url: ctx + 'task/prodOrdQuerySingle/planTaskAndRet',
            type: 'post',
            traditional: true,            // 阻止深度序列化， 使参数可以使用数组
            dataType: 'json',
            contentType: "application/x-www-form-urlencoded",
            data: {
                prodNo: $("#prodNo").val()
            },
            async: true,                // 异步执行
            success: function (result) {
                if (result.type === web_status.SUCCESS) {
                    let planList = result.data.planList;
                    let planTypeList = result.data.taskTypeList;
                    let planTypeArray = new Array();
                    planTypeArray.push('<div class="task" style="color:#000000;font-size:28px;font-width: 900;width:322px;background: #e8ffe8;height:51px;display: flex;align-items: center;justify-content: center;border-top:1px #000000 solid;border-right:  1px #000000 solid;border-bottom:1px #000000 solid;border-left:  1px #000000 solid;">计划节点</div>');
                    for (let i = 0; i < planTypeList.length; i++) {
                        let planArray = new Array();
                        let heightRadix = 51;
                        let prpdPlaEndDat = '';
                        if (planTypeList[i] === '设计') {
                            heightRadix = heightRadix * 2 - 1;
                            for (let j = 0; j < planList.length; j++) {
                                if (planList[j].type2 === '设计') {
                                    if (planList[j].prpdPlaEndDat != null) {
                                        prpdPlaEndDat = planList[j].prpdPlaEndDat;
                                    }
                                    planArray.push('<li style="width: 322PX;"><a><span class="pull-left" style="width:190px;text-align: left;">' + planList[j].prpdNam + '</span><span class="pull-right" style="width:100px;">' + prpdPlaEndDat + '</span></a></li>');
                                    prpdPlaEndDat = '';
                                }
                            }
                        } else if (planTypeList[i] === '工艺') {
                            heightRadix = heightRadix * 2 - 1;
                            for (let j = 0; j < planList.length; j++) {
                                if (planList[j].type2 === '工艺') {
                                    if (planList[j].prpdPlaEndDat != null) {
                                        prpdPlaEndDat = planList[j].prpdPlaEndDat;
                                    }
                                    planArray.push('<li style="width: 322PX;"><a><span class="pull-left" style="width:190px;text-align: left;">' + planList[j].prpdNam + '</span><span class="pull-right" style="width:100px;">' + prpdPlaEndDat + '</span></a></li>');
                                    prpdPlaEndDat = '';
                                }
                            }
                        } else if (planTypeList[i] === '采购') {
                            heightRadix = heightRadix * 2 - 1;
                            for (let j = 0; j < planList.length; j++) {
                                if (planList[j].type2 === '采购') {
                                    if (planList[j].prpdPlaEndDat != null) {
                                        prpdPlaEndDat = planList[j].prpdPlaEndDat;
                                    }
                                    planArray.push('<li style="width: 322PX;"><a><span class="pull-left" style="width:190px;text-align: left;">' + planList[j].prpdNam + '</span><span class="pull-right" style="width:100px;">' + prpdPlaEndDat + '</span></a></li>');
                                    prpdPlaEndDat = '';
                                }
                            }
                        } else if (planTypeList[i] === '生产') {
                            heightRadix = heightRadix * 6 - 1;
                            for (let j = 0; j < planList.length; j++) {
                                if (planList[j].type2 === '生产') {
                                    if (planList[j].prpdPlaEndDat != null) {
                                        prpdPlaEndDat = planList[j].prpdPlaEndDat;
                                    }
                                    planArray.push('<li style="width: 322PX;"><a><span class="pull-left" style="width:190px;text-align: left;">' + planList[j].prpdNam + '</span><span class="pull-right" style="width:100px;">' + prpdPlaEndDat + '</span></a></li>');
                                    prpdPlaEndDat = '';
                                }
                            }
                        } else if (planTypeList[i] === '仓储1') {
                            heightRadix = heightRadix * 2 - 1;
                            for (let j = 0; j < planList.length; j++) {
                                if (planList[j].type2 === '仓储1') {
                                    if (planList[j].prpdPlaEndDat != null) {
                                        prpdPlaEndDat = planList[j].prpdPlaEndDat;
                                    }
                                    planArray.push('<li style="width: 322PX;"><a><span class="pull-left" style="width:190px;text-align: left;">' + planList[j].prpdNam + '</span><span class="pull-right" style="width:100px;">' + prpdPlaEndDat + '</span></a></li>');
                                    prpdPlaEndDat = '';
                                }
                            }
                        } else if (planTypeList[i] === '装配') {
                            heightRadix = heightRadix * 4 - 1;
                            for (let j = 0; j < planList.length; j++) {
                                if (planList[j].type2 === '装配') {
                                    if (planList[j].prpdPlaEndDat != null) {
                                        prpdPlaEndDat = planList[j].prpdPlaEndDat;
                                    }
                                    planArray.push('<li style="width: 322PX;"><a><span class="pull-left" style="width:190px;text-align: left;">' + planList[j].prpdNam + '</span><span class="pull-right" style="width:100px;">' + prpdPlaEndDat + '</span></a></li>');
                                    prpdPlaEndDat = '';
                                }
                            }
                        } else if (planTypeList[i] === '仓储2') {
                            heightRadix = heightRadix * 2 - 1;
                            for (let j = 0; j < planList.length; j++) {
                                if (planList[j].type2 === '仓储2') {
                                    if (planList[j].prpdPlaEndDat != null) {
                                        prpdPlaEndDat = planList[j].prpdPlaEndDat;
                                    }
                                    planArray.push('<li style="width: 322PX;"><a><span class="pull-left" style="width:190px;text-align: left;">' + planList[j].prpdNam + '</span><span class="pull-right" style="width:100px;">' + prpdPlaEndDat + '</span></a></li>');
                                    prpdPlaEndDat = '';
                                }
                            }
                        } else if (planTypeList[i] === '发货') {
                            heightRadix = heightRadix * 1 - 1;
                            for (let j = 0; j < planList.length; j++) {
                                if (planList[j].type2 === '发货') {
                                    if (planList[j].prpdPlaEndDat != null) {
                                        prpdPlaEndDat = planList[j].prpdPlaEndDat;
                                    }
                                    planArray.push('<li style="width: 322PX;"><a><span class="pull-left" style="width:190px;text-align: left;">' + planList[j].prpdNam + '</span><span class="pull-right" style="width:100px;">' + prpdPlaEndDat + '</span></a></li>');
                                    prpdPlaEndDat = '';
                                }
                            }
                        } else if (planTypeList[i] === '安装') {
                            heightRadix = heightRadix * 4 - 1;
                            for (let j = 0; j < planList.length; j++) {
                                if (planList[j].type2 === '安装') {
                                    if (planList[j].prpdPlaEndDat != null) {
                                        prpdPlaEndDat = planList[j].prpdPlaEndDat;
                                    }
                                    planArray.push('<li style="width: 322PX;"><a><span class="pull-left" style="width:190px;text-align: left;">' + planList[j].prpdNam + '</span><span class="pull-right" style="width:100px;">' + prpdPlaEndDat + '</span></a></li>');
                                    prpdPlaEndDat = '';
                                }
                            }
                        }
                        planTypeArray.push('<div id="planType_' + eval(i + 1) + '" class="task" style="width:322px;background: transparent;height:' + heightRadix + 'px;display: flex;align-items: center;justify-content: center;border-right:  1px #000000 solid;border-bottom:  1px #000000 solid;border-left:  1px #000000 solid;"><ul id="planTypeList_' + eval(i + 1) + '" style="width:322PX;">' + planArray.join('') + '</ul></div>');
                    }
                    $('#plan').html(planTypeArray);
                    let retList = result.data.retList;
                    let retArray = new Array();
                    retArray.push('<div class="task" style="color:#000000;font-size:28px;font-width: 900;background: #e8ffe8;width:322px;height:51px;display: flex;align-items: center;justify-content: center;border-top:  1px #000000 solid;border-right:  1px #000000 solid;">反馈节点</div>');
                    for (let i = 0; i < retList.length; i++) {
                        let ret = retList[i];
                        if (ret.prprCod != 'r10' && ret.prprCod != 'r12' && ret.prprCod != 'r13' && ret.prprCod != 'r14' && ret.prprCod != 'r02') {
                        // if (ret.prprCod != 'r10' && ret.prprCod != 'r12' && ret.prprCod != 'r13' && ret.prprCod != 'r14' && ret.prprCod != 'r02') {
                            let height = '50px;'
                            if (ret.prprCod === 'r09') {
                                height = '61px;';
                            }else if (ret.prprCod === 'r04' || ret.prprCod === 'r05') {
                                height = '25px;';
                            } else if (ret.prprCod === 'r11') {
                                height = '128px;';
                            } else if (ret.prprCod === 'r06' || ret.prprCod === 'r07' || ret.prprCod === 'r08') {
                                height = '34px;';
                            } else if (ret.prprCod === 'r15' || ret.prprCod === 'r16' || ret.prprCod === 'r17') {
                                height = '33.95px;';
                            } else if (ret.prprCod === 'r18' || ret.prprCod === 'r19' || ret.prprCod === 'r20') {
                                height = '33.8px;';
                            } else if (ret.prprCod === 'r22' || ret.prprCod === 'r23' || ret.prprCod === 'r24') {
                                height = '33.95px;';
                            } else if (ret.prprCod === 'r25' || ret.prprCod === 'r26' || ret.prprCod === 'r27') {
                                height = '33.8px;';
                            }else if(ret.prprCod === 'r01' ){
                                height = '100px;'
                            }
                            retArray.push('<div style="background: transparent;height:' + height + ';display: flex;align-items: center;justify-content: center;border-top:  1px #000000 solid;border-right:  1px #000000 solid;">' +
                                '<div style="float: left;width:160px;"><a>' + (ret.prprRetDat == null ? '' : ret.prprNam) + '</a></div>' +
                                '<div style="background: #000000;width:1px;height: 100%">&nbsp;</div>' +
                                '<div style="float:left;width:159px;line-height:100%"><a>' +(ret.prprRetDat == null ? '' : ret.prprRetDat)+ '</a></div>' +
                                '</div>');
                            if (ret.prprCod === 'r20') {
                                retArray.push('<div style="background: transparent;height:101px;display: flex;align-items: center;justify-content: center;border-top:  1px #000000 solid;border-right:  1px #000000 solid;cursor:not-allowed">/</div>');
                            }
                        } else if (ret.prprCod != 'r10' && ret.prprCod != 'r12' && ret.prprCod != 'r13' && ret.prprCod != 'r14' && ret.prprCod != 'r02' && ret.prprRetDat == null) {
                            let height = '50px;';
                            if (ret.prprCod === 'r09') {
                                height = '60px;';
                            }else  if (ret.prprCod === 'r04' || ret.prprCod === 'r05') {
                                height = '25px;';
                            } else if (ret.prprCod === 'r11') {
                                height = '128px;';
                            } else if (ret.prprCod === 'r06' || ret.prprCod === 'r07' || ret.prprCod === 'r08') {
                                height = '33.8px;';
                            } else if (ret.prprCod === 'r15' || ret.prprCod === 'r16' || ret.prprCod === 'r17') {
                                height = '33.95px;';
                            } else if (ret.prprCod === 'r18' || ret.prprCod === 'r19' || ret.prprCod === 'r20') {
                                height = '33.8px;';
                            } else if (ret.prprCod === 'r22' || ret.prprCod === 'r23' || ret.prprCod === 'r24') {
                                height = '33.95px;';
                            } else if (ret.prprCod === 'r25' || ret.prprCod === 'r26' || ret.prprCod === 'r27') {
                                height = '33.8px;';
                            }
                            retArray.push('<div style="background: transparent;height:' + height + ';display: flex;align-items: center;justify-content: center;border-top:  1px #000000 solid;border-right:  1px #000000 solid;">' +
                                '<div style="float: left;width:160px;">&nbsp;</div>' +
                                '<div style="background: #000000;width:1px;height: 100%">&nbsp;</div>' +
                                '<div style="float:left;width:159px;line-height:100%">&nbsp;</div>' +
                                '</div>');
                            if (ret.prprNam === '自动化装配完成日期') {
                                retArray.push('<div style="background: transparent;height:101px;display: flex;align-items: center;justify-content: center;border-top:  1px #000000 solid;border-right:  1px #000000 solid;">/</div>');
                            }
                        } else if ((ret.prprCod == 'r10' || ret.prprCod == 'r12' || ret.prprCod == 'r13' || ret.prprCod == 'r14') && ret.prprCod != 'r02' && ret.prprRem != null && ret.prprRetDat != null) {
                            let height = '50px;';
                            if (ret.prprCod === 'r10') {
                                height = '128px';
                            } else if (ret.prprCod == 'r12' || ret.prprCod == 'r13' || ret.prprCod == 'r14') {
                                height = '33.5px;'
                            }
                            retArray.push('<div style="background: transparent;height:' + height + ';display: flex;align-items: center;justify-content: center;border-top:  1px #000000 solid;border-right:  1px #000000 solid;">' +
                                '<div style="float: left;width:160px;"><a>' + ret.prprNam + '</a></div>' +
                                '<div style="background: #000000;width:1px;height: 100%">&nbsp;</div>' +
                                '<div style="float:left;width:159px;line-height:100%"><a>' + (ret.prprRem == null ? '' : ret.prprRem) + '</a></div>' +
                                '</div>');
                        } else if ((ret.prprCod == 'r10' || ret.prprCod == 'r12' || ret.prprCod == 'r13' || ret.prprCod == 'r14') && ret.prprCod != 'r02' && ret.prprRem == null) {
                            let height = '50px;';
                            if (ret.prprCod === 'r10') {
                                height = '115.5px';
                            }else if (ret.prprCod === 'r10') {
                                height = '115.5px';
                            }
                            else if (ret.prprCod == 'r12' || ret.prprCod == 'r13') {
                                height = '33.5px;'
                            }else if(ret.prprCod == 'r14'){
                                height = '34px;'
                            }
                            retArray.push('<div style="background: transparent;height:' + height + ';display: flex;align-items: center;justify-content: center;border-top:  1px #000000 solid;border-right:  1px #000000 solid;">' +
                                '<div style="float: left;width:160px;">&nbsp;</div>' +
                                '<div style="background: #000000;width:1px;height: 100%">&nbsp;</div>' +
                                '<div style="float:left;width:159px;line-height:100%">&nbsp;</div>' +
                                '</div>');
                        }
                    }
                    $('#ret').html(retArray);
                    let taskList = result.data.taskList;
                    let cutIsComplete = false;
                    let rivetAndSolderIsComplete = false;
                    let machiningPartsByrivetAndSolderIsComplete = false;
                    let reflowWeldmentIsComplete = false;
                    let machiningIsComplete = false;
                    for (let i = 0; i < taskList.length; i++) {
                        /**
                         * 制作件清单及图纸
                         */
                        if (taskList[i].protCod === 't01') {
                            js.post({
                                url: ctx + "task/prodOrdQuerySingle/getDesignStatus",
                                data: {proCode: $("#proCode").val()},
                                success: function (result) {
                                    if (result.type === web_status.SUCCESS) {
                                        taskList[i].protSta = result.data;
                                        accordingStatusChangeBackgroundColor('partslistAndDrawings', taskList[i]);
                                    }
                                }
                            });
                        }
                        /**
                         * 外购件计划
                         */
                        if (taskList[i].protCod === 't02') {
                            js.post({
                                url: ctx + "task/prodOrdQuerySingle/getDesignStatus",
                                data: {proCode: $("#proCode").val()},
                                success: function (result) {
                                    if (result.type === web_status.SUCCESS) {
                                        taskList[i].protSta = result.data;
                                        accordingStatusChangeBackgroundColor('purPlan', taskList[i]);
                                    }
                                }
                            });
                            // accordingStatusChangeBackgroundColor('purPlan', taskList[i]);
                        }
                        /**
                         * 工艺
                         */
                        if (taskList[i].protCod === 't03') {
                            js.post({
                                url: ctx + "task/prodOrdQuerySingle/getCraftStatus",
                                data: {proCode: $("#proCode").val()},
                                success: function (result) {
                                    if (result.type === web_status.SUCCESS) {
                                        taskList[i].protSta = result.data;
                                        accordingStatusChangeBackgroundColor('technology', taskList[i]);
                                    }
                                }
                            });
                            // accordingStatusChangeBackgroundColor('technology', taskList[i]);
                        }
                        /**
                         * 原材料提报计划
                         */
                        if (taskList[i].protCod === 't04') {
                            js.post({
                                url: ctx + "task/prodOrdQuerySingle/getMaterialStatus",
                                data: {proCode: $("#proCode").val()},
                                success: function (result) {
                                    if (result.type === web_status.SUCCESS) {
                                        taskList[i].protSta = result.data;
                                        accordingStatusChangeBackgroundColor('rawMaterialPlan', taskList[i]);
                                    }
                                }
                            });
                            // accordingStatusChangeBackgroundColor('rawMaterialPlan', taskList[i]);
                        }
                        /**
                         * 外协件提报计划
                         */
                        if (taskList[i].protCod === 't05') {
                            js.post({
                                url: ctx + "task/prodOrdQuerySingle/getOutsourcingStatus",
                                data: {proCode: $("#proCode").val()},
                                success: function (result) {
                                    if (result.type === web_status.SUCCESS) {
                                        taskList[i].protSta = result.data;
                                        accordingStatusChangeBackgroundColor('outsourcingPartsPlan', taskList[i]);
                                    }
                                }
                            });
                            // accordingStatusChangeBackgroundColor('outsourcingPartsPlan', taskList[i]);
                        }
                        // /**
                        //  * 原材料使用库存
                        //  * 原材料采购
                        //  */
                        // if (taskList[i].protCod === 'p05') {
                        //     accordingStatusChangeBackgroundColor('rawMaterialUseStock', taskList[i]);
                        //     accordingStatusChangeBackgroundColor('rawMaterialProcurement', taskList[i]);
                        // }
                        // /**
                        //  * 外协件采购
                        //  */
                        // if (taskList[i].protCod === 't09') {
                        //     accordingStatusChangeBackgroundColor('outsourcingPartsProcurement1', taskList[i]);
                        //     accordingStatusChangeBackgroundColor('outsourcingPartsProcurement2', taskList[i]);
                        // }
                        // /**
                        //  * 外购件采购
                        //  */
                        // if (taskList[i].protCod === 't06') {
                        //     accordingStatusChangeBackgroundColor('purPartProcurement1', taskList[i]);
                        //     accordingStatusChangeBackgroundColor('purPartProcurement2', taskList[i]);
                        //     accordingStatusChangeBackgroundColor('purPartProcurement3', taskList[i]);
                        // }
                        /**
                         * 下料
                         */
                        if (taskList[i].protCod === 't10') {
                            accordingStatusChangeBackgroundColor('cut', taskList[i]);
                            if ($("#cut").attr("class") === "task bg-green") {
                                cutIsComplete = true;
                            }
                        }
                        /**
                         * 铆焊
                         */
                        if (taskList[i].protCod === 't27') {
                            accordingStatusChangeBackgroundColor('rivetAndSolder', taskList[i]);
                            if ($("#rivetAndSolder").attr("class") === "task bg-green") {
                                rivetAndSolderIsComplete = true;
                            }
                        }
                        /**
                         * 机加件（铆焊）
                         */
                        if (taskList[i].protCod === 't27') {
                            accordingStatusChangeBackgroundColor('machiningPartsByrivetAndSolder', taskList[i]);
                            if ($("#machiningPartsByrivetAndSolder").attr("class") === "task bg-green") {
                                machiningPartsByrivetAndSolderIsComplete = true;
                            }
                        }
                        /**
                         * 返焊件
                         */
                        if (taskList[i].protCod === 't27') {
                            accordingStatusChangeBackgroundColor('reflowWeldment', taskList[i]);
                            if ($("#reflowWeldment").attr("class") === "task bg-green") {
                                reflowWeldmentIsComplete = true;
                            }
                        }
                        /**
                         * 机加
                         */
                        if (taskList[i].protCod === 't27') {
                            accordingStatusChangeBackgroundColor('machining', taskList[i]);
                            if ($("#machining").attr("class") === "task bg-green") {
                                machiningIsComplete = true;
                            }
                        }
                        // /**
                        //  * 装配派工单
                        //  */
                        // if (taskList[i].protCod === 't20') {
                        //     accordingStatusChangeBackgroundColor('assemblyDispatchList', taskList[i]);
                        // }
                        /**
                         * 装配
                         */
                        if (taskList[i].protCod === 't21') {
                            accordingStatusChangeBackgroundColor('assembling', taskList[i]);
                        }
                        // /**
                        //  * 成品库（虚拟）
                        //  */
                        // if (taskList[i].protCod === 't22') {
                        //     accordingStatusChangeBackgroundColor('virtualProductWarehouse', taskList[i]);
                        // }
                        // /**
                        //  * 成品库（实体）
                        //  */
                        // if (taskList[i].protCod === 't23') {
                        //     accordingStatusChangeBackgroundColor('productWarehouse', taskList[i]);
                        // }
                        // /**
                        //  * 发货清单
                        //  */
                        // if (taskList[i].protCod === 't24') {
                        //     accordingStatusChangeBackgroundColor('deliveryList', taskList[i]);
                        // }
                        // /**
                        //  * 安装派工单
                        //  */
                        // if (taskList[i].protCod === 't25') {
                        //     accordingStatusChangeBackgroundColor('installationDispatchList', taskList[i]);
                        // }
                        /**
                         * 安装
                         */
                        if (taskList[i].protCod === 't26') {
                            accordingStatusChangeBackgroundColor('install', taskList[i]);
                        }
                    }
                    if (cutIsComplete === false && rivetAndSolderIsComplete === false && machiningPartsByrivetAndSolderIsComplete === false && reflowWeldmentIsComplete === false && machiningIsComplete === false) {
                        $("#productionTask").attr("class", "task")
                    } else if (cutIsComplete || rivetAndSolderIsComplete || machiningPartsByrivetAndSolderIsComplete || reflowWeldmentIsComplete || machiningIsComplete || machiningIsComplete) {
                        $("#productionTask").attr("class", "task bg-yellow");
                    } else if (cutIsComplete && rivetAndSolderIsComplete && machiningPartsByrivetAndSolderIsComplete && reflowWeldmentIsComplete && machiningIsComplete && machiningIsComplete) {
                        $("#productionTask").attr("class", "task bg-green");
                    }
                }
            },
            error: function () {
                js.modal.fail();
            }
        });
    });
    /**
     * 鼠标移动
     * @param arr
     * @param a
     * @param b
     * @returns {*[]}
     * @constructor
     */
    function Move(arr, a, b) {
        let arr_temp = [].concat(arr);  //创建一个新的临时数组，用以操作后不变更原数组
        arr_temp.splice(b, 0, arr_temp.splice(a, 1)[0]);  //在b位置插入从a位置截取的元素
        return arr_temp;
    }
    /**
     * 根据样式改变背景颜色
     * @param id
     * @param task
     */
    function accordingStatusChangeBackgroundColor(id, task) {
        if (task.protSta === 1) {
            $("#" + id).attr("class", "task");
        } else if (task.protSta === 2) {
            $("#" + id).attr("class", "task bg-yellow");
        } else if (task.protSta === 3) {
            $("#" + id).attr("class", "task bg-light-green");
        }
    }
    //跳转页面检测
    function jumpPage(prodNo) {
        js.post({
            url: ctx + 'task/checkProdPlaExist',
            type: 'post',
            traditional: true,            // 阻止深度序列化， 使参数可以使用数组
            dataType: 'json',
            contentType: "application/x-www-form-urlencoded",
            data: {
                prodNo: prodNo
            },
            async: true,                // 异步执行
            success: function (result) {
                if (result.type === web_status.SUCCESS) {
                    location.href = ctx + 'task/gotoReturnAndTaskEditPage/' + prodNo;
                } else {
                    js.modal.warning(result.msg);
                }
            }
        });
    }
    /**
     * 需不需要的单选按钮样式
     * @param dom
     */
    function changeNeed(dom) {
        if ($(dom).hasClass('lcs_on')) {
            $(dom).addClass('lcs_off');
            $(dom).removeClass('lcs_on');
            $(dom).prev().val(0);
        } else {
            $(dom).addClass('lcs_on');
            $(dom).removeClass('lcs_off');
            $(dom).prev().val(1);
        }
    }
    /**
     * 保存
     */
    function saveTaskStatus() {
        $.ajax({
            type: 'POST',
            url: ctx + "task/saveTaskStatus",
            data: {
                'proCode': $("#btn_taskIsNeed").attr('data-proCode'),
                "craftIsNeed": $("#check-3").val(),
                "deliverGoodsInstallIsNeed":$("#check-8").val(),
                "debuggingIsNeed": $("#check-7").val()
            },
            success: function (result) {
                js.modal.success("操作成功");
                window.opener.reLoad();
            }
        });
    }
    //鼠标移入
    function atagHouve(aId) {
        $('#' + aId).attr('style', 'font-size:16px;color:#000000;width: 100%;height: 100%;display: block; cursor:pointer;');
    }
    //鼠标移出
    function atagLeave(aId) {
        $('#' + aId).attr('style', 'font-size:14px;color:#000000;width: 100%;height: 100%;display: block; cursor:default;');
    }
    /** 任务是否需要数据回显 */
    function selTask() {
        $.ajax({
            type: 'POST',
            url: ctx + "task/selectProjectTask",
            data: {'proCode': $("#btn_taskIsNeed").attr('data-proCode')},
            success: function (result) {
                $("#check-4").val(result.data.craftIsNeed);
                $("#check-7").val(result.data.debuggingIsNeed);
                if (result.data.craftIsNeed == 0) {
                    $("#modal-Task div[name^='check-3']").removeClass('lcs_on');
                    $("#modal-Task div[name^='check-3']").addClass('lcs_off');
                } else {
                    $("#modal-Task div[name^='check-3']").addClass('lcs_on');
                    $("#modal-Task div[name^='check-3']").removeClass('lcs_off');
                }
                if (result.data.debuggingIsNeed == 0) {
                    $("#modal-Task div[name^='check-7']").removeClass('lcs_on');
                    $("#modal-Task div[name^='check-7']").addClass('lcs_off');
                } else {
                    $("#modal-Task div[name^='check-7']").addClass('lcs_on');
                    $("#modal-Task div[name^='check-7']").removeClass('lcs_off');
                }
                if(result.data.deliverGoodsInstallIsNeed==0){
                    $("#modal-Task div[name^='check-8']").removeClass('lcs_on');
                    $("#modal-Task div[name^='check-8']").addClass('lcs_off');
                }else{
                    $("#modal-Task div[name^='check-8']").addClass('lcs_on');
                    $("#modal-Task div[name^='check-8']").removeClass('lcs_off');
                }
            }
        });
    }
</script>
</body>
</html>